package com.ctsi.framework.common.exception;

import javax.validation.constraints.NotNull;
import java.util.Map;

/**
 * @author: zhangjw
 * @Date: 2018/9/16 22:28
 * @Description:
 */
 class BasedException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private String ret;
    private Map<String,Object> addition;

    public BasedException(@NotNull String ret, String msg) {
        super(msg);
        this.ret = ret;
        this.addition = null;
    }

    public BasedException(@NotNull String ret, String msg,Map<String,Object> addition) {
        super(msg);
        this.ret = ret;
        this.addition = addition;
    }

    public BasedException(String ret, String msg, Throwable cause) {
        super(msg, cause);
        this.ret = ret;
        this.addition = null;
    }

    public BasedException(String ret, String msg,Map<String,Object> addition, Throwable cause) {
        super(msg, cause);
        this.ret = ret;
        this.addition = addition;
    }

    public String getRet() {
        return ret;
    }

    public Map<String,Object> getAddition(){
        return addition;
    }
}
